Move schema/ConfigurationSchema.json under the Generated folder#10271
Conversation
Updated the generator to write ConfigurationSchema.json to Generated/schema/ instead of schema/. Updated NewProjectScaffolding pack item references and regenerated all test projects. Agent-Logs-Url: https://github.com/microsoft/typespec/sessions/885ca9bd-de06-4816-8b31-55b8342c3c46 Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
commit: |
|
@copilot if we detect a custom ConfigurationSchema.json we should skip generating the schema. |
When a custom ConfigurationSchema.json is detected at schema/ConfigurationSchema.json (outside the Generated folder), the generator now skips generating the schema and .targets files. NewProjectScaffolding also checks the custom path first for pack items. Agent-Logs-Url: https://github.com/microsoft/typespec/sessions/6cd1df1d-4044-4894-abb7-7c77d70b9a50 Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
Added in 3e82ed4. |
NewProjectScaffolding doesn't have to handle the custom path. If there is a custom path then NewProjectScaffolding would not be executing. @copilot |
...client-csharp/generator/Microsoft.TypeSpec.Generator/src/Primitives/NewProjectScaffolding.cs
Show resolved
Hide resolved
Per review feedback: NewProjectScaffolding doesn't need to handle the custom schema path since it wouldn't be executing when a custom schema exists. Agent-Logs-Url: https://github.com/microsoft/typespec/sessions/9eb66940-80a6-42d3-b9c1-78eacaa4d459 Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
|
@copilot run Generate.ps1 |
Agent-Logs-Url: https://github.com/microsoft/typespec/sessions/1aedace8-6e7c-4cd2-a69d-7a7e3f17fe23 Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
…generated Agent-Logs-Url: https://github.com/microsoft/typespec/sessions/100fa1fc-602a-41ef-a835-888bd1dfd935 Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsoft/typespec/sessions/667520e0-32c6-45e8-8014-50f27f81cefb Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
Re-ran
This is implemented in
Updated in fcd41ca — |
Moves the generated
ConfigurationSchema.jsonfromschema/toGenerated/schema/in the output directory, aligning it with the existingGenerated/folder convention for auto-generated artifacts. Also skips schema generation when a customConfigurationSchema.jsonis detected atschema/ConfigurationSchema.json.ScmCodeModelGenerator.cs: Output path changed toGenerated/schema/ConfigurationSchema.json; added early return to skip generation when a custom schema exists atschema/ConfigurationSchema.jsonNewProjectScaffolding.cs: Updated pack item path toGenerated/schema/ConfigurationSchema.json; guarded pack items (schema +.targets) with a custom schema check so they are only added when no customschema/ConfigurationSchema.jsonexistsGenerate.ps1; schema files moved,.csprojreferences updated